package club.monkeywood.exception;

import club.monkeywood.enums.ResponseEnum;
import lombok.Data;


//电商异常
@Data
public class SellException extends RuntimeException {

    private Integer code;

    public SellException(ResponseEnum responseEnum) {
        super(responseEnum.getDesc());

        this.code = responseEnum.getCode();
    }

    public SellException(Integer code, String msg) {
        super(msg);
        this.code = code;
    }
}
